<script setup>
const emit = defineEmits(['play']);

const handlePlay = () => {
  emit('play');
};
</script>

<template>
  <div class="play-overlay">
    <div class="play-container">
      <h1 class="game-title">Super Mario</h1>
      <button class="play-button" @click="handlePlay">
        <span class="play-icon">▶</span>
        开始游戏
      </button>
    </div>
  </div>
</template>

<style scoped>
.play-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9998;
}

.play-container {
  text-align: center;
  color: white;
}

.game-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  color: #ffa516;
}

.play-button {
  background: linear-gradient(145deg, #ff6b35, #ff8c42);
  border: none;
  border-radius: 50px;
  padding: 1rem 2rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 16px rgba(255, 107, 53, 0.3);
  min-width: 200px;
  margin: 0 auto;
}

.play-button:hover {
  background: linear-gradient(145deg, #ff8c42, #ffa516);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.4);
}

.play-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.play-icon {
  font-size: 1.2rem;
  margin-left: -0.2rem;
}
</style>
